const state = {
  login: false,
  user: ''
};

const getters = {
  hasLogin(state) {
    return state.login;
  },
  userInfo(state) {
    return state.user;
  }
};

const mutations = {
  loginStatus(state, status) {
    state.login = status;
  },
  setUser(state, data) {
    state.user = data;
  }
};

const actions = {};

const UserModule = {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
};

export default UserModule;
